﻿@model System.Collections.Generic.List<WebChatSites.Models.WeChat.CheapProductData>
    @{
        DateTime breakTime = Model.Last().UpdateTime;
    }
<script>
    bttime= '@breakTime.ToString("yyyy-MM-dd HH:mm:ss.fff")';
</script>

@for (int i = 0; i < Model.Count; i++)
{
    var m = Model[i];
    var img = "/Content/Images/taobao.jpg";
    if (m.Shop == "淘宝")
    {
        img = "/Content/Images/taobao.jpg";
    }
    if (m.Shop == "天猫")
    {
        img = "/Content/Images/tmall.jpg";
    }
    <div class="row datarow" data-tmp="@m.UpdateTime.ToString("yyyy-MM-dd HH:mm:ss.fff")" style="height: 5em; border-bottom: #ccc 1px solid; cursor: pointer;" data-id="@m.ProductId" data-shop="@m.Shop">
        <div class="col-xs-3">
            <img class="lazy img-list" data-original="@m.PicUrl" src="@img" style="width: 3em; margin: 1em auto; height: 3em;" />
        </div>
        <div class="col-xs-9" style="margin-top: 0.3em;">
            <div class="row" style="height: 3em;">
                <div class="col-xs-7">
                    <div class="row" style="overflow: hidden; text-overflow: ellipsis; height: 3em;" title="@m.ProductName">@m.ProductName</div>
                    <div class="row" style="font-size: 10px;">
                        <div style="display:inline-block">@(m.Shop)</div>
                        <div style="display: inline-block; color: #b3acad; margin-left: 0.2em;">@m.UpdateTime.GetDateString()</div>
                    </div>
                </div>
                <div class="col-xs-5" style="text-align: right; text-align: right; line-height: 3em;">
                    <div class="row" style="height: 2em; line-height: 2em;">
                        <div class="col-xs-12">@(m.Price)元</div>
                    </div>
                    <div class="row" style="height: 2em; line-height: 2em;">
                        <div class="col-xs-12" style="font-size: 12px; color: #fa8072">@(m.Discount)折</div>
                    </div>
                </div>
            </div>
            <div class="row" style="font-size: 10px;">


            </div>
        </div>

    </div>
}